3.193 \(\int \frac{\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx\)

Optimal. Leaf size=281 \[ -\frac{2 (-1)^{2/3} b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{4/3} d \sqrt{a^{2/3}-(-1)^{2/3} b^{2/3}}}+\frac{2 b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt{a^{2/3}-b^{2/3}}}\right )}{3 a^{4/3} d \sqrt{a^{2/3}-b^{2/3}}}-\frac{2 \sqrt [3]{-1} b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )+(-1)^{2/3} \sqrt [3]{b}}{\sqrt{a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{4/3} d \sqrt{a^{2/3}+\sqrt [3]{-1} b^{2/3}}}-\frac{\cot (c+d x)}{a d} \]

[Out]

(-2*(-1)^(2/3)*b^(2/3)*ArcTan[((-1)^(1/3)*b^(1/3) - a^(1/3)*Tan[(c + d*x)/2])/Sqrt[a^(2/3) - (-1)^(2/3)*b^(2/3
)]])/(3*a^(4/3)*Sqrt[a^(2/3) - (-1)^(2/3)*b^(2/3)]*d) + (2*b^(2/3)*ArcTan[(b^(1/3) + a^(1/3)*Tan[(c + d*x)/2])
/Sqrt[a^(2/3) - b^(2/3)]])/(3*a^(4/3)*Sqrt[a^(2/3) - b^(2/3)]*d) - (2*(-1)^(1/3)*b^(2/3)*ArcTan[((-1)^(2/3)*b^
(1/3) + a^(1/3)*Tan[(c + d*x)/2])/Sqrt[a^(2/3) + (-1)^(1/3)*b^(2/3)]])/(3*a^(4/3)*Sqrt[a^(2/3) + (-1)^(1/3)*b^
(2/3)]*d) - Cot[c + d*x]/(a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.428511, antiderivative size = 281, normalized size of antiderivative = 1., number of steps used = 15, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {3220, 3767, 8, 2660, 618, 204} \[ -\frac{2 (-1)^{2/3} b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{4/3} d \sqrt{a^{2/3}-(-1)^{2/3} b^{2/3}}}+\frac{2 b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt{a^{2/3}-b^{2/3}}}\right )}{3 a^{4/3} d \sqrt{a^{2/3}-b^{2/3}}}-\frac{2 \sqrt [3]{-1} b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )+(-1)^{2/3} \sqrt [3]{b}}{\sqrt{a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{4/3} d \sqrt{a^{2/3}+\sqrt [3]{-1} b^{2/3}}}-\frac{\cot (c+d x)}{a d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2/(a + b*Sin[c + d*x]^3),x]

[Out]

(-2*(-1)^(2/3)*b^(2/3)*ArcTan[((-1)^(1/3)*b^(1/3) - a^(1/3)*Tan[(c + d*x)/2])/Sqrt[a^(2/3) - (-1)^(2/3)*b^(2/3
)]])/(3*a^(4/3)*Sqrt[a^(2/3) - (-1)^(2/3)*b^(2/3)]*d) + (2*b^(2/3)*ArcTan[(b^(1/3) + a^(1/3)*Tan[(c + d*x)/2])
/Sqrt[a^(2/3) - b^(2/3)]])/(3*a^(4/3)*Sqrt[a^(2/3) - b^(2/3)]*d) - (2*(-1)^(1/3)*b^(2/3)*ArcTan[((-1)^(2/3)*b^
(1/3) + a^(1/3)*Tan[(c + d*x)/2])/Sqrt[a^(2/3) + (-1)^(1/3)*b^(2/3)]])/(3*a^(4/3)*Sqrt[a^(2/3) + (-1)^(1/3)*b^
(2/3)]*d) - Cot[c + d*x]/(a*d)

Rule 3220

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> Int[ExpandTr
ig[sin[e + f*x]^m*(a + b*sin[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, e, f}, x] && IntegersQ[m, p] && (EqQ[n, 4]
|| GtQ[p, 0] || (EqQ[p, -1] && IntegerQ[n]))

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx &=\int \left (\frac{\csc ^2(c+d x)}{a}-\frac{b \sin (c+d x)}{a \left (a+b \sin ^3(c+d x)\right )}\right ) \, dx\\ &=\frac{\int \csc ^2(c+d x) \, dx}{a}-\frac{b \int \frac{\sin (c+d x)}{a+b \sin ^3(c+d x)} \, dx}{a}\\ &=-\frac{b \int \left (-\frac{1}{3 \sqrt [3]{a} \sqrt [3]{b} \left (\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}-\frac{(-1)^{2/3}}{3 \sqrt [3]{a} \sqrt [3]{b} \left (\sqrt [3]{a}-\sqrt [3]{-1} \sqrt [3]{b} \sin (c+d x)\right )}+\frac{\sqrt [3]{-1}}{3 \sqrt [3]{a} \sqrt [3]{b} \left (\sqrt [3]{a}+(-1)^{2/3} \sqrt [3]{b} \sin (c+d x)\right )}\right ) \, dx}{a}-\frac{\operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{a d}\\ &=-\frac{\cot (c+d x)}{a d}+\frac{b^{2/3} \int \frac{1}{\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{4/3}}-\frac{\left (\sqrt [3]{-1} b^{2/3}\right ) \int \frac{1}{\sqrt [3]{a}+(-1)^{2/3} \sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{4/3}}+\frac{\left ((-1)^{2/3} b^{2/3}\right ) \int \frac{1}{\sqrt [3]{a}-\sqrt [3]{-1} \sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{4/3}}\\ &=-\frac{\cot (c+d x)}{a d}+\frac{\left (2 b^{2/3}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt [3]{a}+2 \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}-\frac{\left (2 \sqrt [3]{-1} b^{2/3}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt [3]{a}+2 (-1)^{2/3} \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}+\frac{\left (2 (-1)^{2/3} b^{2/3}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt [3]{a}-2 \sqrt [3]{-1} \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}\\ &=-\frac{\cot (c+d x)}{a d}-\frac{\left (4 b^{2/3}\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}+\frac{\left (4 \sqrt [3]{-1} b^{2/3}\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^{2/3}+\sqrt [3]{-1} b^{2/3}\right )-x^2} \, dx,x,2 (-1)^{2/3} \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}-\frac{\left (4 (-1)^{2/3} b^{2/3}\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^{2/3}-(-1)^{2/3} b^{2/3}\right )-x^2} \, dx,x,-2 \sqrt [3]{-1} \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}\\ &=-\frac{2 (-1)^{2/3} b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{4/3} \sqrt{a^{2/3}-(-1)^{2/3} b^{2/3}} d}+\frac{2 b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^{2/3}-b^{2/3}}}\right )}{3 a^{4/3} \sqrt{a^{2/3}-b^{2/3}} d}-\frac{2 \sqrt [3]{-1} b^{2/3} \tan ^{-1}\left (\frac{(-1)^{2/3} \sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{4/3} \sqrt{a^{2/3}+\sqrt [3]{-1} b^{2/3}} d}-\frac{\cot (c+d x)}{a d}\\ \end{align*}

Mathematica [C]  time = 0.309986, size = 196, normalized size = 0.7 \[ \frac{2 b \text{RootSum}\left [-8 i \text{$\#$1}^3 a+\text{$\#$1}^6 b-3 \text{$\#$1}^4 b+3 \text{$\#$1}^2 b-b\& ,\frac{-i \text{$\#$1}^2 \log \left (\text{$\#$1}^2-2 \text{$\#$1} \cos (c+d x)+1\right )+i \log \left (\text{$\#$1}^2-2 \text{$\#$1} \cos (c+d x)+1\right )+2 \text{$\#$1}^2 \tan ^{-1}\left (\frac{\sin (c+d x)}{\cos (c+d x)-\text{$\#$1}}\right )-2 \tan ^{-1}\left (\frac{\sin (c+d x)}{\cos (c+d x)-\text{$\#$1}}\right )}{\text{$\#$1}^4 b-2 \text{$\#$1}^2 b-4 i \text{$\#$1} a+b}\& \right ]+3 \tan \left (\frac{1}{2} (c+d x)\right )-3 \cot \left (\frac{1}{2} (c+d x)\right )}{6 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2/(a + b*Sin[c + d*x]^3),x]

[Out]

(-3*Cot[(c + d*x)/2] + 2*b*RootSum[-b + 3*b*#1^2 - (8*I)*a*#1^3 - 3*b*#1^4 + b*#1^6 & , (-2*ArcTan[Sin[c + d*x
]/(Cos[c + d*x] - #1)] + I*Log[1 - 2*Cos[c + d*x]*#1 + #1^2] + 2*ArcTan[Sin[c + d*x]/(Cos[c + d*x] - #1)]*#1^2
 - I*Log[1 - 2*Cos[c + d*x]*#1 + #1^2]*#1^2)/(b - (4*I)*a*#1 - 2*b*#1^2 + b*#1^4) & ] + 3*Tan[(c + d*x)/2])/(6
*a*d)

________________________________________________________________________________________

Maple [C]  time = 0.193, size = 119, normalized size = 0.4 \begin{align*}{\frac{1}{2\,da}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{1}{2\,da} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}}-{\frac{2\,b}{3\,da}\sum _{{\it \_R}={\it RootOf} \left ( a{{\it \_Z}}^{6}+3\,a{{\it \_Z}}^{4}+8\,b{{\it \_Z}}^{3}+3\,a{{\it \_Z}}^{2}+a \right ) }{\frac{{{\it \_R}}^{3}+{\it \_R}}{{{\it \_R}}^{5}a+2\,{{\it \_R}}^{3}a+4\,{{\it \_R}}^{2}b+{\it \_R}\,a}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -{\it \_R} \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2/(a+b*sin(d*x+c)^3),x)

[Out]

1/2/d/a*tan(1/2*d*x+1/2*c)-1/2/d/a/tan(1/2*d*x+1/2*c)-2/3/d/a*b*sum((_R^3+_R)/(_R^5*a+2*_R^3*a+4*_R^2*b+_R*a)*
ln(tan(1/2*d*x+1/2*c)-_R),_R=RootOf(_Z^6*a+3*_Z^4*a+8*_Z^3*b+3*_Z^2*a+a))

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*sin(d*x+c)^3),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*sin(d*x+c)^3),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2/(a+b*sin(d*x+c)**3),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc \left (d x + c\right )^{2}}{b \sin \left (d x + c\right )^{3} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*sin(d*x+c)^3),x, algorithm="giac")

[Out]

integrate(csc(d*x + c)^2/(b*sin(d*x + c)^3 + a), x)